﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ReadyApps.Wiki;

namespace ReadyAppsTest.Wiki
{
    class TestWikiRoleManager : IWikiRoleManager
    {
        public List<string> UserRoles { get; set; }

        public bool UserIsInRole { get; set; }

        public bool IsUserAuthenticated { get; set; }

        public bool IsUserInRole(string username, string role)
        {
            if (UserRoles != null)
            {
                return UserRoles.Contains(role);
            }
            else
            {
                return UserIsInRole;
            }
        }
    }
}
